from frame.bases.base_user import BaseUser


class Cart(BaseUser):
    """
    定义加入购物车类
    """

    def add(self, goodsid):
        data = {
            "goodsId": goodsid,
            "number": 1,
            "productId": 71
        }
        req = {
            "url": "cart/add",
            "method": "post",
            "json": data
        }
        result = self.send_api(req)
        return result.json()
